﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace _41_DisplayAttribute.Models
{
    [MetadataType(typeof(EmployeeMetaData))]
    //[DisplayColumn("FullName")]
    public partial class Employee
    {
        public class EmployeeMetaData
{
    // Display mailto hyperlink
    [DataType(DataType.EmailAddress)]
    public string EmailAddress { get; set; }

    // Display currency symbol. For country specific currency, set 
    // culture using globalization element in web.config. 
    // For Great Britain Pound symbol
    // <globalization culture="en-gb"/>
    [DataType(DataType.Currency)]
    public int? Salary { get; set; }

    // Generate a hyperlink
    [DataType(DataType.Url)]
    [UIHint("OpenInNewWindow")]
    public string PersonalWebSite { get; set; }

    // Display only Time Part
    // [DataType(DataType.Time)]
    // Display only Date Part
    [DataType(DataType.Date)]
    public DateTime? HireDate { get; set; }
 
} 

    }
}